package com.swotxu.oldwebproject.redis.connection;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @Date: 2021/3/24 0024 13:43
 * @Author: swotxu
 */
public interface IRedisConnection {

    void close();

    Boolean isConnected();

    Long hset(String key, String field, Object object);

    String set(String key, Object object);

    Object hget(String key, String field);

    List hmget(String key, String... field);

    String hmset(String key, Map<String, Object> map);

    Object get(String key);

    Long del(String... keys);

    Long hdel(String key, String... fields);

    Long expire(String key, int seconds);

    Set<String> hkeys(String key);

    Set<String> keys(String key);

    Boolean exists(String key);

    Boolean hexists(String key, String field);

    Object getSet(String key, Object value);
}
